//
//  QBaseVC.m
//  QoilPublic
//
//  Created by zhuang on 16/7/4.
//  Copyright © 2016年 杨凯. All rights reserved.
//
#define TabbarHeight     ([[UIApplication sharedApplication] statusBarFrame].size.height>20?83:49) // 适配iPhone x 底栏高度
#import "QBaseVC.h"
@interface QBaseVC ()

@end

@implementation QBaseVC

- (id)init{
    self = [super init];
    if(self){
       
        [QViewUtility setupNavigationBarBackForController:self backSelector:@selector(back)];
    }
    return self;
}

- (void)viewWillAppear:(BOOL)animated{

    [super viewWillAppear:animated];
    [[NSNotificationCenter defaultCenter] postNotificationName:kNotificationNoPayOrders object:nil];
}

- (void)viewDidLoad {
    [super viewDidLoad];
     self.view.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight - TabbarHeight);
    self.view.backgroundColor = [QColorUtility defaultBackGroundColor];
}
-(void)viewSafeAreaInsetsDidChange{
    [super viewSafeAreaInsetsDidChange];
//   if (@available(iOS 11.0, *)) {
//       self.additionalSafeAreaInsets = UIEdgeInsetsMake(0, 0, 34, -34);
//    }
}
- (void)back{
    [self.navigationController popViewControllerAnimated:YES];
}
@end
